home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010921-20020314 / 000144_psh@home.com_Sun Nov 11 14:14:06 EST 2001.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  45 lines

  1. Article: 12964 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!panix!news-peer.gip.net!news.gsl.net!gip.net!newshub2.rdc1.sfba.home.com!news.home.com!news2.rdc1.bc.home.com.POSTED!not-for-mail
  3. From: jens <psh@home.com>
  4. Subject: Re: Hex operations in Kermit
  5. Newsgroups: comp.protocols.kermit.misc
  6. References: <I72H7.79555$Gh2.24053794@news2.rdc1.bc.home.com>
  7. Lines: 23
  8. User-Agent: KNode/0.6.1
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7Bit
  12. X-No-Archive: yes
  13. Message-ID: <XIzH7.83484$Gh2.25452683@news2.rdc1.bc.home.com>
  14. Date: Sun, 11 Nov 2001 18:47:19 GMT
  15. NNTP-Posting-Host: 24.77.61.172
  16. X-Complaints-To: abuse@home.net
  17. X-Trace: news2.rdc1.bc.home.com 1005504439 24.77.61.172 (Sun, 11 Nov 2001 10:47:19 PST)
  18. NNTP-Posting-Date: Sun, 11 Nov 2001 10:47:19 PST
  19. Organization: Excite@Home - The Leader in Broadband http://home.com/faster
  20. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12964
  21.  
  22. jens wrote:
  23.  
  24. > C-Kermit allows me to send hex code out the serial port with the OUTPUT
  25. > \xnn command. I am looking for a way to receive hex strings, find a match
  26. > and do a task based on what hex string was received. I tried doing this
  27. > with MINPUT and the \xnn notation but Kermit is just splitting it's gut at
  28. > my feable attempts at this.
  29. > How would I go about testing for lets say two hex strings \xaa\xab and
  30. > \x3e\x12 and depending on which string it matches branching to a task
  31. > list.
  32.  
  33. I received lots of help from Frank da Cruz (thanks again !!) and most of my 
  34. testing for hex characters is working. It seems though that \x00 (nul) is a 
  35. special case for some reason and testing for it does not succeed. Does 
  36. anyone know a work-around for this ?
  37.  
  38. As an example, my program might receive the following hex string:
  39. ab 04 cf 69 e8 d5 5c ab 03 93 00 00 bf   
  40. and based on that needs to send out a reply.
  41.  
  42. Thanks
  43.  
  44. Jens
  45.